﻿using log4net;
using Quartz;
using System.Threading.Tasks;

namespace EasyTask.EasyJobs.Demo
{
    /// <summary>
    /// 写Hello的Job
    /// </summary>
    [DisallowConcurrentExecution] //让任务中的延迟执行
    class WriteHelloJob : IJob
    {
        private ILog logger = LogManager.GetLogger(nameof(WriteHelloJob));

        public async Task Execute(IJobExecutionContext context)
        {
            logger.Info("Hello");
            await Task.CompletedTask;
        }
    }
}
